﻿

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public static class UITool
{
    public static void GetStaffDictionary(GameObject target,Dictionary<string,GameObject> dict)
    {
        if (target == null || dict == null ) return;
        dict.Clear();
        Transform[] transforms = target.GetComponentsInChildren<Transform>(true);
        foreach(Transform trans in transforms)
        {
            dict[trans.gameObject.name] = trans.gameObject;
        }
    }
}
